package de.hska.pwmanager.transfer.model;


import de.hska.pwmanager.persistence.model.PasswordUserHash;
import de.hska.pwmanager.persistence.model.User;

public class PasswordUserHashTransfer {
	private String hash;

	private Long id;

	private Long userID;

	public String getHash() {
		return hash;
	}

	public Long getId() {
		return id;
	}
	public Long getUserID() {
		return userID;
	}
	public PasswordUserHash morph() {
		PasswordUserHash userHash = new PasswordUserHash();
		userHash.setHash(getHash());
		userHash.setUser(new User().setId(this.getUserID()));
		return userHash;
	}

	public PasswordUserHashTransfer setHash(String hash) {
		this.hash = hash;
		return this;
	}

	public PasswordUserHashTransfer setId(Long id) {
		this.id = id;
		return this;
	}

	public PasswordUserHashTransfer setUserID(Long userID) {
		this.userID = userID;
		return this;
	}
	
}
